<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Date日期</title>
	<style>
	</style>
</head>
<body>
<script>
let dates = new Date();
//document.writeln(dates.toLocaleString());
/*得到年*/
document.write(dates.getFullYear() + "年" + "<br/>");
/*得到月*/
document.write(dates.getMonth() + 1 + "月" + "<br/>");
/*得到星期*/
document.write("星期" + dates.getDay() + "<br/>");
/*得到日*/
document.write(dates.getDate() + "日" + "<br/>");
/*
*转成习惯的格式: toLocaleString()
*
* */
</script>
</body>
</html>
